package whf.framework.web.tag.ext;

import java.util.Map;

import whf.framework.web.tag.TableRow;

/**
 * 根据行数变色
 * @author wanghaifeng
 * @create Apr 9, 2007 1:17:43 PM
 * 
 */
public class LineNumberColorDifferRowDecorator implements TableRowHTMLDecorator {
	
	/* (non-Javadoc)
	 * @see whf.framework.web.tag.ext.ITableRowPropertyParser#parseRow(whf.framework.web.tag.TableRow, java.util.Map)
	 */
	public String decorateRow(TableRow row, Map<String, String> descriptors) {
		if(row == null) return "";
		String css = descriptors.get("css");
		String focus = TableTagConstants.CSS_TABLE_BODY_ROW_FOCUS;
		return " class='" + css + "' row='" + row.getNumber() + "' onMouseOver='tableTagRowOnMouseOver(this, \""+ focus +"\")' onMouseOut='tableTagRowOnMouseOut(this, \""+css+"\")' onClick='tableTagRowOnClick(this)'";
	}

}
